<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta charset="utf-8"/>
    <title></title>

    <meta name="keywords" content="{$Think.CONFIG.keywords}"/>
    <meta name="description" content="{$Think.CONFIG.description}"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>

    {include file="public/head" /}

</head>
<body>

<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <div class="main-container-inner">
        <a class="menu-toggler" id="menu-toggler" href="#">
            <span class="menu-text"></span>
        </a>

        {include file="public/nav"/}

        {include file="public/menu"/}

        <div class="main-content">
            {include file="public/breadcrumb"/}

            <div class="page-content">
                <div class="row">
                    <div class="cf">
                        <button class="btn btn-info" onclick="indexBackup.doBackup();">备份</button>
                    </div>

                    <div class="space-4"></div>

                    <table id="tbBackup"></table>
                    <div id="tbBackupPager"></div>
                    <table class="table table-bordered table-striped">
                        <tr>
                            <td align="center">备份文件列表</td>
                        </tr>
                        {volist name="files" id="f"}
                        <tr>
                            <td><a target="_blank"
                                   href="{$domain}/docs/backup/{$f.time | date='Ymd-His' ,###}-{$f.part}.sql">{$f.time |
                                date="Ymd-His" ,###}-{$f.part}.sql</a></td>
                        </tr>
                        {/volist}
                    </table>
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div><!-- /.main-content -->

    </div><!-- /.main-container-inner -->

    <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
        <i class="fa fa-angle-double-up fa-only bigger-110"></i>
    </a>
</div>
</body>
{include file="public/footerjs"/}
<script>
    (function () {
        "{:Url('doBackup')}"
        indexBackup = {
            doBackup: function () {
                $.post("{:url('doBackup')}", {}, function (res) {
                    console.log(res);
                })
            }
        }
    }())
</script>
{include file="public/foot" /}
